/**
 * Centro de Informática - UFPE
 * Disc.: Plataformas de Distribuição (IN1118)
 * Exercício 02 - Implementação da camada de interoperabilidade para o uORB.
 * Alunos: Fábio Chicout (fcfmc) / Alysson Barros (abs4)
 */
package br.ufpe.cin.if1118.exerc02bib.transport;

/**
 *
 * @author fabio
 */
public interface Transport {
    
    /**
     * Method in use to a server accept requests;
     * @return boolean (ok or not)
     */
    public boolean accept();
    
    /**
     * Method in use to a client request, connecting to a server
     * @return boolean (ok or not)
     */
    public boolean open();
    
    /**
     * Method to send a buffer
     * @param buffer
     */
    public void send(Buffer buffer);
    
    /**
     * Method to receive a buffer
     * @param buffer
     */
    public int receive(Buffer buffer, int bufferSize);
    
    /**
     * Method to close a socket
     */
    public void close();
}
